{% extends "tpl_admin_base.html" %}
{% block javascript %}
 <script type="text/javascript" src="/fckeditor/fckeditor.js"></script>
 <script type="text/javascript">
  function createEditor() {
      var oFCKeditor = new FCKeditor('editorHtml');
      oFCKeditor.BasePath = "/fckeditor/";
      oFCKeditor.Height = 328;
      oFCKeditor.ReplaceTextarea();
    }

    function initFunc(){
    	node = document.getElementById('editorHtml')
    	if(typeof(node) !== 'undefined' && node != null)
    	{
    		createEditor();  
        } 
    }
  </script>
  {{ block.super }}
{% endblock %}
{% block slides %}
<div id="slogancontainer" class="slides">
 	<img src="/static/images/slogan_3.png" alt="{{specialtitle}}" class="left" />
 </div>
{% endblock %}
{% block nodecontent %}
<div class="content">
	{% ifnotequal success None %}
	<div class="resultmsg">{% if success %}更新成功{% else %}更新失败，请重试{% endif %}</div>
	{% endifnotequal %}
	<div class="buttoncontainer"><a href="/admin/specialist" class="button"><span>返回{{specialtitle}}列表</span></a></div>
    <div class="formcontainer">
     	<form action="{{ request.path }}" method="post" enctype="multipart/form-data">
        <div class="inputcontainer singleline">
	        <label for="text_title">名称：</label>
	        <input name="text_title" value="{% ifnotequal item None%}{{item.title}}{% endifnotequal %}"/>
        </div>
        <div class="editor">
        <div>简介：</div>
	         <textarea id="editorHtml" name="editorHtml">
	         {% ifnotequal item None %}
	         {% ifnotequal item.content None %}
	         {{item.content}}
	         {% endifnotequal %}
	         {% endifnotequal %}
	    	 </textarea>
    	 </div>
    	 {% ifnotequal item None %}
    	 <input type="hidden" name="key" value="{{item.key}}"/>
    	 {% endifnotequal %}
    	 <input type="hidden" name="action" value="{{action}}"/>
    	 <div class="inputcontainer singleline"><input type="submit" name="submit" value="提交" width="100"/></div>
       </form>
     </div>
</div>
{% endblock %}